﻿Shader "Hidden/Skinn/2D/VertexColor/Unlit"
{
	Properties
	{

	}
		SubShader
		{

			Tags {"Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent"}

			Pass
			{
				Tags { "LightMode" = "Vertex" }
				Fog { Mode Off }
				BlendOp Add, Add
				Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
				Lighting Off

				CGPROGRAM
				#pragma vertex vert
				#pragma fragment frag 
				#include "UnityCG.cginc"

				struct v2f
				{
					float4 pos : SV_POSITION;
					float4 color : COLOR;
				};

				v2f vert(appdata_full v)
				{
					v2f o;
					UNITY_INITIALIZE_OUTPUT(v2f,o);
					float2 surface = v.texcoord.xy;
					surface.x = frac(surface.x / 1) * 1;
					surface.y = frac(surface.y / 1) * 1;
					o.pos = float4 (surface * (2.0) -  (1.0), 1.0, 1.0);
					o.pos.y = -o.pos.y;
					o.color = v.color;
					return o;
				}

				half4 frag(v2f i) : COLOR
				{
					return i.color;
				}

				ENDCG
			}
		}
			FallBack "Diffuse"
}